using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using RFS.Domain.PaiShi.Zuhuo;

namespace ItProto1
{
    public interface IZuhuoManager
    {
        DateTime WorkingDay { get; set; }
        IEnumerable<ZaHuaItem> ZaHuaItems { get;   }
        IEnumerable<ZuhuaRecord> ZuHuoItems { get; }
        event EventHandler DayChanged;
        event EventHandler<IEnumerable<ZaHuaItem>> ZaHuaDataChanged;
        event EventHandler<IEnumerable<ZuhuaRecord>> ZuhuaDataChanged;
        Task<IEnumerable<ZaHuaItem>> LoadZaHuaSetAsync(DateTime date = default(DateTime), bool includeHistLeftOver =false);
        // IEnumerable<ZaHuaItem> LoadZuHuaSet(DateTime date=default(DateTime));
        void CreateAllZuhuo(List<ZaHuaItem> selectedObjects, bool cbSavedChecked, bool alsofuzhu = true);
        Task SaveAllAsync(IEnumerable<ZuhuaRecord> os=null);
        Task<IEnumerable<ZaHuaItem>> LoadZuHuaSetAsync(DateTime date = default(DateTime));
        void CreateFuZuhuo(List<ZaHuaItem> selectedObjects, bool save = false);
        void SyncZahuaProductionData();
        void Del(List<ZuhuaRecord> os);
        ZuhuaRecord CopyToNew(ZuhuaRecord o);
        void Add(ZuhuaRecord z);
        List<ZaHuaItem> CopyOrCreateNewZaha(ZaHuaItem model);
        void DelZas(IEnumerable<ZaHuaItem> zaHuaItems);
        void SaveZahua(ZaHuaItem za);
        void SaveZahuas(IEnumerable<ZaHuaItem> os);
        void UpdateSelected(List<ZuhuaRecord> getSelectedObjects, (bool selected, string value) lr, (bool selected, string value) fh);
    }
}